package com.markbuikema.juliana32.ui;

import com.markbuikema.juliana32.R;

public enum Page {
	NIEUWS(R.menu.menu_nieuws, R.menu.menu_nieuws_detail), AGENDA(R.menu.menu_agenda, 0), TEAMS(R.menu.menu_teams,
			0);

	private int menuResId;
	private int detailMenuResId;
	private boolean detail;

	private Page(int menuResId, int detailMenuResId) {
		this.menuResId = menuResId;
		this.detailMenuResId = detailMenuResId;
		detail = false;
	}

	public int getMenuResource() {
		if (detail && detailMenuResId > 0)
			return detailMenuResId;
		else
			return menuResId;
	}

	public void setDetail(boolean detail) {
		this.detail = detail;
	}

	public boolean isDetail() {
		return detail;
	}

	public int id() {
		return ordinal();
	}
}
